.class public final Lkairo/android/c/b;
.super Ljava/io/OutputStream;


# instance fields
.field protected a:[[B

.field protected b:I

.field protected c:I

.field protected d:I


# direct methods
.method public constructor <init>()V
    .locals 3

    const/4 v2, 0x0

    invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V

    const/4 v0, 0x1

    const/16 v1, 0x100

    filled-new-array {v0, v1}, [I

    move-result-object v0

    sget-object v1, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;

    invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[B

    iput-object v0, p0, Lkairo/android/c/b;->a:[[B

    iput v2, p0, Lkairo/android/c/b;->b:I

    iput v2, p0, Lkairo/android/c/b;->d:I

    iput v2, p0, Lkairo/android/c/b;->c:I

    return-void
.end method

.method private b()V
    .locals 4

    const/4 v3, 0x0

    iget-object v0, p0, Lkairo/android/c/b;->a:[[B

    array-length v0, v0

    add-int/lit8 v0, v0, 0x1

    new-array v0, v0, [[B

    iget-object v1, p0, Lkairo/android/c/b;->a:[[B

    iget-object v2, p0, Lkairo/android/c/b;->a:[[B

    array-length v2, v2

    invoke-static {v1, v3, v0, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    array-length v1, v0

    add-int/lit8 v1, v1, -0x1

    const/16 v2, 0x100

    new-array v2, v2, [B

    aput-object v2, v0, v1

    iput-object v0, p0, Lkairo/android/c/b;->a:[[B

    return-void
.end method


# virtual methods
.method public final a()I
    .locals 1

    iget v0, p0, Lkairo/android/c/b;->b:I

    return v0
.end method

.method public final a(II)[B
    .locals 8

    const/4 v1, 0x0

    new-array v5, p2, [B

    div-int/lit16 v0, p1, 0x100

    rem-int/lit16 v2, p1, 0x100

    move v3, v2

    move v2, v0

    move v0, v1

    :goto_0
    iget-object v4, p0, Lkairo/android/c/b;->a:[[B

    array-length v4, v4

    if-ge v2, v4, :cond_1

    if-ge v0, p2, :cond_1

    iget-object v4, p0, Lkairo/android/c/b;->a:[[B

    aget-object v6, v4, v2

    sub-int v4, p2, v0

    array-length v7, v6

    sub-int/2addr v7, v3

    if-le v4, v7, :cond_0

    array-length v4, v6

    sub-int/2addr v4, v3

    :cond_0
    invoke-static {v6, v3, v5, v0, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    add-int/2addr v0, v4

    add-int/lit8 v2, v2, 0x1

    move v3, v1

    goto :goto_0

    :cond_1
    return-object v5
.end method

.method public final close()V
    .locals 4

    const/4 v3, 0x0

    const/4 v2, 0x0

    iget-object v0, p0, Lkairo/android/c/b;->a:[[B

    array-length v0, v0

    add-int/lit8 v0, v0, -0x1

    :goto_0
    if-lez v0, :cond_0

    iget-object v1, p0, Lkairo/android/c/b;->a:[[B

    aput-object v3, v1, v0

    add-int/lit8 v0, v0, -0x1

    goto :goto_0

    :cond_0
    iput-object v3, p0, Lkairo/android/c/b;->a:[[B

    iput v2, p0, Lkairo/android/c/b;->b:I

    iput v2, p0, Lkairo/android/c/b;->d:I

    iput v2, p0, Lkairo/android/c/b;->c:I

    return-void
.end method

.method public final flush()V
    .locals 0

    return-void
.end method

.method public final write(I)V
    .locals 3

    iget v0, p0, Lkairo/android/c/b;->d:I

    const/16 v1, 0x100

    if-lt v0, v1, :cond_0

    iget v0, p0, Lkairo/android/c/b;->c:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lkairo/android/c/b;->c:I

    const/4 v0, 0x0

    iput v0, p0, Lkairo/android/c/b;->d:I

    iget v0, p0, Lkairo/android/c/b;->c:I

    iget-object v1, p0, Lkairo/android/c/b;->a:[[B

    array-length v1, v1

    if-lt v0, v1, :cond_0

    invoke-direct {p0}, Lkairo/android/c/b;->b()V

    :cond_0
    iget-object v0, p0, Lkairo/android/c/b;->a:[[B

    iget v1, p0, Lkairo/android/c/b;->c:I

    aget-object v0, v0, v1

    iget v1, p0, Lkairo/android/c/b;->d:I

    and-int/lit16 v2, p1, 0xff

    int-to-byte v2, v2

    aput-byte v2, v0, v1

    iget v0, p0, Lkairo/android/c/b;->d:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lkairo/android/c/b;->d:I

    iget v0, p0, Lkairo/android/c/b;->b:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lkairo/android/c/b;->b:I

    return-void
.end method

.method public final write([B)V
    .locals 2

    const/4 v0, 0x0

    array-length v1, p1

    invoke-virtual {p0, p1, v0, v1}, Lkairo/android/c/b;->write([BII)V

    return-void
.end method

.method public final write([BII)V
    .locals 4

    move v1, p3

    :goto_0
    if-lez v1, :cond_2

    iget v0, p0, Lkairo/android/c/b;->d:I

    const/16 v2, 0x100

    if-lt v0, v2, :cond_0

    iget v0, p0, Lkairo/android/c/b;->c:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lkairo/android/c/b;->c:I

    const/4 v0, 0x0

    iput v0, p0, Lkairo/android/c/b;->d:I

    iget v0, p0, Lkairo/android/c/b;->c:I

    iget-object v2, p0, Lkairo/android/c/b;->a:[[B

    array-length v2, v2

    if-lt v0, v2, :cond_0

    invoke-direct {p0}, Lkairo/android/c/b;->b()V

    :cond_0
    iget v0, p0, Lkairo/android/c/b;->d:I

    rsub-int v0, v0, 0x100

    if-le v0, v1, :cond_1

    move v0, v1

    :cond_1
    iget-object v2, p0, Lkairo/android/c/b;->a:[[B

    iget v3, p0, Lkairo/android/c/b;->c:I

    aget-object v2, v2, v3

    iget v3, p0, Lkairo/android/c/b;->d:I

    invoke-static {p1, p2, v2, v3, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget v2, p0, Lkairo/android/c/b;->d:I

    add-int/2addr v2, v0

    iput v2, p0, Lkairo/android/c/b;->d:I

    iget v2, p0, Lkairo/android/c/b;->b:I

    add-int/2addr v2, v0

    iput v2, p0, Lkairo/android/c/b;->b:I

    sub-int/2addr v1, v0

    add-int/2addr p2, v0

    goto :goto_0

    :cond_2
    return-void
.end method
